package vn.candyapp.qlct.database.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class AccountList implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private ArrayList<Account> accountList = new ArrayList<Account>();

	public Account getAccountAtPosition(int position) {
		if (position < accountList.size())
			return accountList.get(position);
		return null;
	}
	
	public ArrayList<Account> getAccountList() {
		return accountList;
	}

	public void setAccountList(ArrayList<Account> accountList) {
		this.accountList = accountList;
	}
	
	public List<String> getAccountNames() {
		List<String> names = new ArrayList<String>();
		for (Account acc : accountList) {
			names.add(acc.getName());
		}
		return names;
	}
	
}
